import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter, Route, Switch} from 'react-router-dom'
import registerServiceWorker from './registerServiceWorker';
import './index.css';
import ProductList from "./client/product/list";
import MainLayout from "./backend/main/layout";

const App = () => (
    <BrowserRouter>
        <Switch>
            <Route exact path={'/'} component={ProductList} />
            <Route path={'/backend'} component={MainLayout} />
        </Switch>
    </BrowserRouter>
);


ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
